<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg no-smil svgclippaths">

	<head>
		<meta charset="UTF-8">
		<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<!-- 引入样式 -->
		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
		<link rel="stylesheet" href="css/delinote.css">
		<!-- 引入组件库 -->
		<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="../js/axios.js"></script>
<script type="text/javascript" src="../js/qs.js"></script>
		<title></title>
	</head>

	<body class="fixed-left"><iframe name="CalFrame" width="144" height="192" id="CalFrame" src="/css/calendar.htm" style="border: 0px; border-image: none; display: none; position: absolute; z-index: 100;"></iframe>
		<title>XToolsCRM - easy to Power</title>

		<div class="enlarged forced" id="wrapper">


		
		

			<!--UTF8-->
			<div id="del" style="position:absolute; visibility:hidden;&#9;left:0;&#9;top:0; width:0;&#9;height:0; z-index:100; background-color:#D4D0C8; "></div>
			<!-- basewin iframe -->

		

			<div tabindex="-1" class="modal fade" id="popact" role="dialog" aria-hidden="true" aria-labelledby="myModalLabel" style="display: none;">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button class="close" aria-hidden="true" type="button" data-dismiss="modal">×</button>
							<h4 class="modal-title">操作</h4>
						</div>
						<div class="modal-body">

						</div>
						<div class="modal-footer">
							<div id="editsublayer" style="position:absolute; visibility:hidden;&#9;left:0;&#9;top:0; width:0;&#9;height:0;">
								<iframe name="popact_iframe" id="popact_iframe" src="/a.html" scrolling="no" style="width: 0; height: 0; border: 0;"></iframe></div>
							<!-- <button type="button" class="btn btn-default waves-effect" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary waves-effect waves-light">保存</button> -->
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			</div>
			<!-- /.modal -->
			<!-- 页面头部结束 -->

			<!-- ============================================================== -->
			<!-- 右侧主体内容开始-->
			<!-- ============================================================== -->
			<div class="content-page crm">
				<div class="content">
					<div class="container-fluid" style="min-height: 900px;">
						<div class="row">


							<!--这里是总的div放所有内容的-->
							<div class="allBaBox">
								<el-form :model="ruleForm" ref="ruleForm" class="demo-ruleForm">
							<div class="col-sm-12">
								<!----------------筛选、查询input代码开始-------------------->
								<div id="search" style="z-index:0">
									<div id="editsublayer" style="position:absolute; visibility:hidden;&#9;left:0;&#9;top:0; width:0;&#9;height:0; z-index:100; background-color:#D4D0C8; ">
										<iframe name="qssub" src="/a.html" style="width: 0; height: 0; border: 0;"></iframe>
									</div>
									<form name="qsearch" class="form-inline" role="form" onsubmit="hideDiv(); return true;" action="/system/qssub.xt" method="POST" target="qssub" novalidate="">

										<div class="form-group ">
											<label class="control-label col-sm-2 m-t-10"><i class="fa fa-filter m-r-5"></i></label>
											<div class="col-sm-10">
												<div class="btn-group bootstrap-select form-control show-tick">
													<div class="box">
														<el-select v-model="ruleForm.selects" slot="prepend"
															clearable placeholder="全部数据"
															style="background: #ccc;width: 113px;"> 
															<el-option
															label="已发货" value="3018"></el-option> 
															<el-option
															label="未发货" value="3017"></el-option>  </el-select>


													</div>
												</div>
											</div>

											<input name="dtname" type="hidden" value="deli_note"><input name="mdb" type="hidden" value="a5687eab80dec53936f7a801e825424d"><input name="comname" type="hidden" value="search">
											<input name="qsnum" type="hidden" value="1">
											<input name="qsnumt" type="hidden" value="">
											<input name="seno" type="hidden" value="0">
											<input name="sel" type="hidden" value="">
										</div>
										<div style="position:absolute; visibility:hidden;left:0;top:0; width:0;height:0; z-index:100; background-color:#D4D0C8; ">
											<textarea name="ids" rows="2" cols="20"></textarea>
										</div>
										<div class="form-group">
											 <!--搜索栏那一块-->
											<div class="box2"
												style="width: 300px; height: 40px; margin-top: 5px;">
												<el-input placeholder="请输入内容" v-model="ruleForm.selectinput">

												<el-button slot="prepend" icon="el-icon-search"
													@click="submitForm('ruleForm')"></el-button></el-input>

											</div>
										</div>

									</form>

									
									<!--UTF8-->
								</div>

								<!----------------列表-------------------->

								<div id="qlist" style="z-index:0">
									<div id="editqlist" style="position:absolute; display:none;&#9;left:0;&#9;top:0; width:0;&#9;height:0; z-index:100; background-color:#D4D0C8; "><iframe name="editsubqlist" width="1" height="1" src="/a.html" frameborder="0" scrolling="no"></iframe></div>
									<form name="formedit_qlist" action="/system/alldel.xt" method="POST" target="editsubqlist" novalidate=""><input name="mdb" type="hidden" value="a5687eab80dec53936f7a801e825424d"><input name="db" type="hidden" value="deli_note"><input name="cn" type="hidden" value="qlist">
										<div class="row m-t-15 f-s-12" style="height: 35px;">
											<div class="col-sm-6">
												<span set-lan="html:交付记录/发货明细">交付记录/发货明细</span>
												<small class="text-muted font-13">共{{ruleForm.totalCount}}条</small>

											</div>
											<div class="col-sm-6 text-right">
													<div id="app">
<!--<iframe border="2px red solid"></iframe>-->
		 </div>
    	
												<!--<button class="btn btn-white waves-effect waves-light" onclick="vopen('/sys/plist/modprice.xt?0&amp;mdb=5d9733','actrun',999,600);"><i class="fa fa-pencil m-r-5"></i>调整成本价</button>&nbsp;<button class="btn btn-white waves-effect waves-light" onclick='qlist_click_insert(0,"5d9733");return false;'><i class="fa fa-plus-circle m-r-5"></i>新建</button>&nbsp;<button class="btn btn-white btn-custom f-s-12" id="btn_list_fields"><i class="fa fa-th"></i></button>
											-->
											</div>
										</div>

										<div class="tab-content p-0">
											<div class="bootstrap-table m-t-10">
												<div class="fixed-table-container overflow-x-auto">
													<table class="table table-bordered table-hover table-z" id="qlist_table">
														<thead>
															<tr>
																

																<th class="th-inner">
																	<p>
																		<a class="na" href="JavaScript:qlist_argv_orderf='id'; qlist_argv_orderv=0;qlist_load();" set-lan="html:ID">ID</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="left">
																		<a class="na" href="JavaScript:qlist_argv_orderf='status'; qlist_argv_orderv=0;qlist_load();" set-lan="html:交付状态">交付状态</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="left">
																		<a class="na" href="JavaScript:qlist_argv_orderf='date'; qlist_argv_orderv=0;qlist_load();" set-lan="html:交付日期">交付日期</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="left">
																		<a class="na" href="JavaScript:qlist_argv_orderf='cu_id'; qlist_argv_orderv=0;qlist_load();" set-lan="html:客户">客户</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="right">
																		<a class="na" href="JavaScript:qlist_argv_orderf='deli_sum'; qlist_argv_orderv=0;qlist_load();" set-lan="html:交付数量">交付数量</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="left">
																		<a class="na" href="JavaScript:qlist_argv_orderf='p_id'; qlist_argv_orderv=0;qlist_load();" set-lan="html:产品">产品</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="left">
																		<a class="na" href="JavaScript:qlist_argv_orderf='co_id'; qlist_argv_orderv=0;qlist_load();" set-lan="html:合同/订单">合同/订单</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="right">
																		<a class="na" href="JavaScript:qlist_argv_orderf='sum'; qlist_argv_orderv=0;qlist_load();" set-lan="html:金额">单个成本</a>
																	</p>
																</th>
																<th class="th-inner">
																	<p align="right">
																		<a class="na" href="JavaScript:qlist_argv_orderf='costprice'; qlist_argv_orderv=0;qlist_load();" set-lan="html:单个成本">金额</a>
																	</p>
																</th>
																<th class="th-inner">
																	</th>
															</tr>
														</thead>
														<tbody class="bg-white">

															<tr v-for="(colle,i) in tableData">
																
																<td>
																	<p><!-- {{colle.ded_id}} -->{{i+1}}</p>
																</td>
																<td>
																 <!-- 已完成的 -->
																	<p v-if="colle.ded_state==3018" >
																	<i class="el-icon-check" type="success"></i>
																	</p>
																	<!-- 未完成的 -->
																	<p v-else-if="colle.ded_state==3017">
																	<i class="el-icon-sold-out" type="info" ></i>
																	</p>
																	
																	
																</td>
																<td>
																	
																	<p align="left">
																		{{colle.ded_date}}</p>
																</td>
																<td>
																	<p align="left"><span style="font-weight:normal;color:#9e9e9e">〖</span>{{colle.cus_name}}
																		<a :href="'/cusview?id='+colle.cus_id"><i class="fa fa-folder-open m-l-5" data-original-title="打开详细页面" data-toggle="tooltip" data-placement="bottom"></i></a><span style="font-weight:normal;color:#9e9e9e">〗</span></p>
																</td>
																<td>
																	<p align="right">{{colle.ded_nonum}}</p>
																</td>
																<td>
																	<p align="left">{{colle.goo_name}}
																		<a href="javascript:vopen('/xcrm/market/product/detail.xt?id=103','product103',999,600);"><i class="fa fa-folder-open m-l-5" data-original-title="打开详细页面" data-toggle="tooltip" data-placement="bottom"></i></a>
																	</p>
																</td>
																<td>
																	<p align="left"><a :href="getOrderHref(colle.o_id)"><span style="font-weight:normal;color:#9e9e9e">〖</span>{{colle.otitle}}
																		<i class="fa fa-folder-open m-l-5" data-original-title="打开详细页面" data-toggle="tooltip" data-placement="bottom"></i><span style="font-weight:normal;color:#9e9e9e">〗</span></a></p>
																</td>
																<td>
																	<p align="right"><span style="white-space:nowrap"><span style="font-size:9pt;font-weight:normal;">￥</span>{{colle.ded_price}}</span>
																	</p>
																</td>
																<td>
																	<p align="right"><span style="white-space:nowrap"><span style="font-size:9pt;font-weight:normal;">￥</span>{{colle.ded_sumprice}}</span>
																	</p>
																</td>
																<td width="1%" nowrap="">
																	
																	<!-- <i class="el-icon-menu" @click="fahuoto(colle.ded_id)" style="cursor: pointer;"></i> -->
																		
													<i class="el-icon-menu" v-if="colle.ded_state!=3018" 
																			@click.prevent="updatebyid(colle.ded_id)"
																			style="cursor: pointer;"></i>
													
																</td>
															</tr>
															
															
															
															<tr>
																<td>
																	&nbsp;</td>
																<td nowrap="">
																	<font color="#41a5ff">∑本页</font>
																</td>
																<td nowrap="">&nbsp;</td>
																
																<td nowrap="">&nbsp;</td>
																<td nowrap="">&nbsp;</td>
																<td nowrap="">
																	<p align="right">
																		<font color="#41a5ff">{{allMoney}}</font>
																	</p>
																</td>
																<td nowrap="">&nbsp;</td>
																<td nowrap="">&nbsp;</td>
																<td nowrap="">
																	<p align="right">
																		<font color="#41a5ff"><span style="white-space:nowrap"><span style="font-size:9pt;font-weight:normal;">￥</span>{{allhuikuan}}</span>
																		</font>
																	</p>
																</td>
																<td nowrap="">&nbsp;
																</td>
																<td></td>
															</tr>
														</tbody>
													</table>
												</div>
											</div>
											<div class="row m-t-10">
												<div class="col-sm-3">
												</div>
												<div class="col-sm-7 text-center">
													<div class="block">
														
														<!--分页那块-->
														<el-pagination @size-change="handleSizeChange"
															@current-change="handleCurrentChange"
															:current-page="ruleForm.currentPage"
															:page-size="ruleForm.pagesize"
															layout="total, prev, pager, next, jumper"
															:total="ruleForm.totalCount"> </el-pagination>
														<!--分页那块-->
														
													</div>
												</div>
												<div class="col-sm-2 text-right">
													
												</div>
											</div>
										</div>
										
	
						<el-dialog title="发货"
									:visible.sync="dialogVisible" width="900px" center>

								<iframe :src="iframdilog" width="850"
									style="height: 1100px; text-align: center;" frameborder="0"
									scrolling="no">
								</iframe> 
						</el-dialog>
						
										<!--UTF8-->
									</form>
									<form name="outexcel" action="/sys/plist/listout.xt" method="POST" novalidate=""><input name="dt" type="hidden" value="deli_note"><input name="w" type="hidden" value="a5gATPnFGbmRGI"><input name="dcr" type="hidden" value="b525c"></form>
									<form name="actname1" action="/sys/cupool/listout.xt" method="POST" novalidate=""><input name="dt" type="hidden" value="deli_note"><input name="w" type="hidden" value="a5gATPnFGbmRGI"><input name="dcr" type="hidden" value="b525c"><input name="modparam" type="hidden" value=""></form>
								</div>
								<!----------------统计-------------------->

							</div>
						<!--中间表单弹出层--> <el-dialog title="修改订单"
									:visible.sync="centerDialogVisible2" width="830px" center>

								<iframe :src="iframdilog" width="802"
									style="height: 505px; text-align: center;" frameborder="0"
									scrolling="no"></iframe> </el-dialog> 
						</el-form>
							</div>
							
								<script type="text/javascript">
							
					
							 
									var vm = new Vue({
										el: ".allBaBox",
										data: {
											allMoney:"",
											allhuikuan:"",
											allyeshuikuan:"",
											iframdilog:"",
											dialogVisible: false,
											centerDialogVisible2:false,
											select: "全部数据",
											options: [{
												value: '3001',
												label: '产品销售'
											}, {
												value: '3002',
												label: '服务'
											}, {
												value: '3003',
												label: '业务合作'
											}, {
												value: '3004',
												label: '代理分销'
											}],
											//表格当前页数据
			               					tableData: [],
											ruleForm: {
											    //下拉条件按钮
											    selects: "全部数据",
												//搜索框
												selectinput: '',
												//下拉条件按钮
												selectend: '',
											    //默认每页数据量
				              				    pagesize:10,
				              				    //当前页码
				               				    currentPage: 1,
				               				    //默认数据总数
				              					totalCount: ''
						      				    },deletids:""
						      				   
										},
										methods: {
											handleClose(done) {
												var aad=this;
												this.$confirm('确认关闭？')
													.then(_ => {
														aad.sss="aaa";
														done();
													})
													.catch(_ => {
														aad.sss="bbb";
													});
											},
											handleCommand(command) {
												this.$message('click on item ' + command);
												this.ruleForm.selects = command;
											},
											//从服务器读取数据
							                loadData: function(pageNum, pageSize){  
							                	
							                	var iosnn=this;
							                	//post提交数据
												axios.post("/onSale/fahuo2",
													//参数转换
													Qs.stringify(this.ruleForm, {
														arrayFormat: 'brackets'
													})		
												).then(function(v) {

													if (v.data.list!=null) {
													iosnn.tableData = v.data.list;
													iosnn.ruleForm.totalCount = v.data.total;
													var strs=0;
													var huikuan=0.0;
													iosnn.tableData.forEach(v => {
														 strs +=v.ded_nonum;
														 if (v.ded_sumprice!=null) {
															 huikuan+=v.ded_sumprice;
														}
														
														 
													})
													iosnn.allMoney=strs;
													iosnn.allhuikuan=huikuan; 
													console.info(v.data.list); 
												}
												}).catch(function(e) {
													alert("出错了"+e);
												});
							                },
							                handleSizeChange(val) {
												console.log('每页 ${val} 条');
												this.ruleForm.pagesize = val;
										        console.log( this.ruleForm.pagesize+'条');
										        //this.ruleFormloadData();
											},
											handleCurrentChange(val) {
												this.ruleForm.currentPage = val;
											    console.log(this.ruleForm.currentPage+'当前');
											    this.loadData();
											},
											submitForm(formName) {
												//验证方法
												this.$refs[formName].validate((valid) => {
													if(valid) {
														//alert("aa");
														this.loadData(this.currentPage, this.pagesize);
													} else {
														//alert("aa");
														console.log('error submit!!');
														return false;
													}
												});
											},getOrderHref(val){
												//alert(val);
												return 'shozhongordertwo2?oid='+val;
											},
											updatebyid:function(c){
												// alert(c);
												 this.iframdilog="/fahuoidgoods?id="+c;
												 this.centerDialogVisible2 = true;
											    }
										      
										},
										mounted() {
											var iosnn=this;
											//post提交数据
											axios.post("/onSale/fahuo",
												//参数转换
												Qs.stringify(this.ruleForm, {
													arrayFormat: 'brackets'
												})		
											).then(function(v) {
												if (v.data.list!=null) {
													iosnn.tableData = v.data.list;
													iosnn.ruleForm.totalCount = v.data.total;
													var strs=0;
													var huikuan=0.0;
													iosnn.tableData.forEach(v => {
														 strs +=v.ded_nonum;
														 if (v.ded_sumprice!=null) {
															 huikuan+=v.ded_sumprice;
														}
														
														 
													})
													iosnn.allMoney=strs;
													iosnn.allhuikuan=huikuan; 
													console.info(v.data.list); 
												}
												
												//iosnn.allyeshuikuan=yeshuikuan;

											}).catch(function(e) {
												alert("出错了"+e);
											});
											

										}
										
									})
								</script>

	
							</div>

					</div>

				</div>

				

			</div>

			<!-- ============================================================== -->
			<!-- 右侧主体内容结束 -->
			<!-- ============================================================== -->

		</div>
	</body>

</html>
